<?php
/* SVN FILE: $Id: mysql_tables.php 260 2010-01-21 22:38:54Z supersmashbrothers $ */
/**
* ibMarket 2
* IP.Board 3.0
* Bank Plugin
* ibMarket SQL installation create and alter queries
*
* @author $Author: supersmashbrothers $
* @copyright $Copyright$
* @version $Revision: 260 $
* @lastrevision $Date: 2010-01-21 22:38:54 +0000 (Thu, 21 Jan 2010) $
* @modifiedby $LastChangedBy: supersmashbrothers $
* @lastmodified $LastChangedDate: 2010-01-21 22:38:54 +0000 (Thu, 21 Jan 2010) $
* @filesource $URL: http://ipb-ibmarket.googlecode.com/svn/ibmarket2/trunk/admin/applications_addon/other/ibmarket/plugins/transfer/install/mysql_tables.php $
*/

$TABLE[] = "CREATE TABLE market_transfer_logs (
  l_id int(10) NOT NULL auto_increment,
  l_time int(10) NOT NULL default '0',
  l_ip_address varchar(15) NOT NULL default '',
  l_from mediumint(8) NOT NULL default '0',
  l_to mediumint(8) NOT NULL default '0',
  l_amount bigint(19) NOT NULL default '0',
  l_fee bigint(19) NOT NULL default '0',
  l_anon tinyint(1) NOT NULL default '0',
  PRIMARY KEY (l_id),
  KEY from_id (l_from),
  KEY to_id (l_to)
);";

$TABLE[] = "CREATE TABLE market_transfer_item_logs (
  log_id int(10) NOT NULL default '0',
  l_inventory_id int(10) NOT NULL default '0',
  l_item_id int(10) NOT NULL default '0',
  l_price_bought int(10) NOT NULL default '0',
  l_resell_price int(10) NOT NULL default '0',
  l_item_category int(10) NOT NULL default '0',
  l_item_name varchar(255) NOT NULL default '',
  l_item_description text NOT NULL,
  l_item_icon varchar(255) NOT NULL default '',
  l_category_name varchar(255) NOT NULL default '',
  KEY log_id (log_id)
);";

$TABLE[] = "CREATE TABLE market_transfer_permissions (
  group_id int(10) NOT NULL,
  p_option varchar(255) NOT NULL,
  allowed tinyint(1) NOT NULL,
  UNIQUE KEY permission (group_id, p_option)
);";

$TABLE[] = "CREATE TABLE market_transfer_fees (
  fee_id int(10) NOT NULL auto_increment,
  group_id int(10) NOT NULL,
  fee_type varchar(255) NOT NULL,
  apply enum('flat','percent') NOT NULL,
  amount float(15,10) NOT NULL,
  PRIMARY KEY (fee_id),
  KEY fee (group_id, fee_type)
);";

?>